﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态修改CSS的样式</title>
    <script language="javascript">
        function changeStyle(obj)
        {
            obj.runtimeStyle.cssText = "color:#990000;border:1px solid #cccccc";
        }
    </script>
</head>
<body>
<input id="btn1" type="button" value="修改颜色" onclick="changeStyle(this)" />
</body>
</html>